<template>
  <span>
    <ul v-if="data && data.length" :class="[prefixCls + '-menu']">
      <casitem class="Casitem prefixCls"
        v-for="item in data"
        :key="item"
        :prefix-cls="prefixCls"
        :data="item"
        @click.native.stop="handleClickItem(item)"
        @mouseenter.native.stop="handleHoverItem(iten)"
      >
      </casitem>
    </ul>
  </span>
</template>

<script>
import casitem from './casitem'
export default {
  name: 'Caspanel',
  components: {
    casitem
  },
  props: {
    data: {
      type: Array,
      default() {
        return [];
      }
    },
    disabled: Boolean,
    changeOnSelect: Boolean,
    trigger: String,
    prefixCls: String,
  },
  watch: {
    data() {
      this.sublist = [];
    }
  },
  data() {
    return {
      tmpItem: {},
      result: [],
      sublist: []
    }
  },
  methods: {
    handleClickItem(item) {
      console.log("点击");
      console.log(item);
    },
    handleHoverItem(item) {
      console.log("划过");
      console.log(item);
    }
  }
}
</script>
